package com.example.demo.pojo.vo;

import com.example.demo.pojo.entity.ExamPaper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 传回前端的试卷信息
 * @author: fjh
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExamPaperVO {
    private Integer examPaperId;
    private String examPaperName;
    private Integer questionCount;
    private Double averageDifficulty;
    private String description;
    private Integer totalScore;
    private Integer category;
    private String createUser;
    private List<ExamCategoryVO>examPaperCategoryList=new ArrayList<>();
    public void initExamPaper(ExamPaper examPaper){
        this.examPaperId=examPaper.getId();
        this.examPaperName=examPaper.getExamPaperName();
        this.averageDifficulty=examPaper.getAverageDifficulty();
        this.description=examPaper.getDescription();
        this.totalScore=examPaper.getTotalScore();
        this.questionCount=examPaper.getQuestionCount();
        this.category=examPaper.getCategory();
        this.createUser=examPaper.getCreateUser();
    }
}
